#include <list>
#include <mutex>
#include <algorithm>


std::list<int> some_list;
std::mutex some_mutex;


void add_to_list(int new_value)  
{  
	std::lock_guard<std::mutex> guard(some_mutex); // 3  
	some_list.push_back(new_value);  
}


bool list_contains(int value_to_find)  
{  
	std::lock_guard<std::mutex> guard(some_mutex); // 4  
	return  std::find(some_list.begin(),some_list.end(),value_to_find) != some_list.end();  
}